package com.jadefashion.mapper;


import com.jadefashion.pojo.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PermissionMapper {
    //    分页查询permission数据
    List<Permission> queryPageData(@Param("queryString") String queryString, @Param("offset") int offset, @Param("pageInfoCount") Integer pageInfoCount);

    //查询数据总数
    Long queryTotalCount(@Param("queryString") String queryString);

    //添加permission
    void addPermission(Permission permission);

    //删除permission
    void deletePermission(@Param("id") Integer id);

    //编辑permission
    void editPermission(Permission permission);

    //在user详情中查询permission id
    Integer queryPermissionIdForUserDetail(@Param("id") Integer id);

    //查询所有permission数据
    List<Permission> queryAllPermission();

    //查询role对应permission
    List<Permission> queryPermissionForRoleId(@Param("roleId") Integer id);
}
